﻿using System.ComponentModel.DataAnnotations;

namespace FEShop.AppUserService.Models
{
    /// <summary>
    /// 购物车实体类
    /// </summary>
    [SugarTable("shop_cart")]
    public class ShopCart
    {

        [Key]
        public Guid Id { get; set; }

        [Required]
        public Guid UserId { get; set; }

        public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
        public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;

        // 导航属性
        public virtual ICollection<ShopCartItem> Items { get; set; } = new List<ShopCartItem>();

    }
}
